package com.bxl.netty.rpc.common.message;

/**
 * <>
 *
 * @author baixl
 * @date 2021/2/25
 */
public class MsgResponseContent {
    
    private int code;
    private String desc;
    private Object content;

    public Object getContent() {
        return content;
    }

    public MsgResponseContent(Object content) {
        this.content = content;
    }

    public MsgResponseContent() {
    }

    public MsgResponseContent(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MsgResponseContent successContent(){
        return new MsgResponseContent(0,"成功");
    }

    public static MsgResponseContent failContent(String msg){
        return new MsgResponseContent(0,msg);
    }
    
    public void setContent(Object content) {
        this.content = content;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
